/**
 * @author Shen Yi - bm2736892@gmail.com
 */
/**
 * 判断变量是否存在
 * @param {Object} variable
 */
function isset(variable)
{
	if(typeof(variable) != "undefined"){
		return true;
	}
	return false;
}

function dumpMatrix(matrix)
{
	html = "";
	for(var i = 0; i < matrix.length; i++){
		var row = matrix[i];
		for(var j = 0; j < row.length; j++){
			html += row[j] + "; ";
		}
		html += "<br />";
	}
	return html;
}

function dumpVector(vector)
{
	html = "";
	
	for(var i = 0; i < vector.length; i++){
		html += vector[i] + "; ";
	}
	return html;
}

function dumpObject(obj)
{
	html = "";
	for(var key in obj){
		html += key + " => " + obj[key] +"<br />"; 
	}
	return html;
}

function error(errorMsg)
{
	alert(errorMsg);
}

function toJSON(o){
  return o3djs.valueToString_(o);
}
